added ochrebox settings file i/o, removed preferences file, fixed resource cleanup on main window close