Main menu refactoring.