Implement exiting the program through the menu