cleaning up code to adhere to coding conventions