Finishing splitting to MVC of the main window.