Implemented a ViewModel for the MainWindow and some view elements.