Cleanup before migrating to git.
Removed uses of const non-reference return types.

A return type of const non-reference is useless since it can be freely
assigned to a non-const variable and then modified.