Clean up mainwindow for connections