MainWindow's constructor takes the smaller interfaces separately
Copy in a bunch of DI code.
Prepare MainWindow for DI
fix the bug introduced in 9c24f391b26c674fc8686f6f41a914bf60d6e65a.