-Finished main window implementation