main menu and try again implemented, clean up of code