Removed some pass by reference.