MainWindow implementation.