Refactor Main to be entirely static
Changes from IDE code inspection
Fix issues left from code inspection
Reformat blocks
Remove old commented code