Added the main menu loop