Added functionality so that NSUserDefaults will remember view if app is closed or crashes