Cleans up code and comments