Removing pass-by-reference