Allow functions/methods to close the main window if needed without prompting
the user while still properly cleaning up everything.