slightly cleaned up mainwindow.*