Merge pull request #46 from murrekatt/main_cleanup

Main cleanup
Adjusted comments around if-statements.
Fix for main function signature.
Moved out helper class into anonymous namespace.
Changed to use nullptr.
Clarified endifs.