Added code so it exists the program when the exist button is clicked in the main menu