Overall cleanup, passing arguments as references added