Mass fixes for object passed by value and some build-in types passed by reference.