remove unneeded main window