Added some methods to MainWindow