Changed methods for managing NSUserDefaults.