Merge pull request #47 from murrekatt/main_cleanup

Even more main cleanup
Cleanup of variable naming and consts.