StateMainMenu, Minor Refactoring

Updated and cleaned up version of PR #1094.