Hooking up the quit event to actually close the main window