division of mainwindow

divided mainWindow into classes