MainWindow class implemented