Refactor Window

Change: rename MainWindow class to Window.
Change: improve Window constructor code grouping.