minor adjustments to mainwindow.cpp