clean up code and comments