clean up code and comment