Move NSUserDefaults logic out of the view controllers.