add 'const' modifiers to types where appropriate