Some changes. Maybe, lots of functions from mainwindow class will be deleted