Clean up mainwindow.cpp