Updated AppDelegate and CloudKit