Clean up some code
Adjust comment style and add some  comments