Clean up main window.