Refactored the main menu