Moving methods to MainWindow controller.
Code behaviour moved in controller classes.