Moved the main window into the responsibility of the application
context.