Created a separate NSWindow class for main window. Started using NSUserDefaults
.