Remove comments and clean up some code