Refactor main menu