Add main window implementation