Cleanup the code and comments