Added NSUserDefaults for settings. Other small things.