Clean up code for reduced references