Remove some unnecessary pass-by-reference.