Added main menu logic