Added some comments to mainwindow.cpp