Refactored the main menu.