clean up code to conform to coding guidelines