minor refactoring, fixed NSUserDefaults init