Minor cleanup and documentation. Some questions

Cleaned up main and a few other files to conform to the style guide.
Search main for the string "// Note:" for notes and questions from me.