Begin working on allowing the main-window to be closed and reopened. DOES NOT WORK.