Changed get_input method to check for user exit (x)