             cacheFetchRequest.resultType = .ManagedObjectResultType
             cacheFetchRequest.propertiesToFetch = [kPALResourceIdentifierAttributeName]
             
-            var managedObjs: [AnyObject] = []
             let results = backingContext.executeFetchRequest(cacheFetchRequest, error: &error)! as NSArray
-            let resourceIds = results.valueForKeyPath(kPALResourceIdentifierAttributeName) as NSArray
-            
-            for obj: AnyObject in resourceIds {
-                let resourceId = obj as NSString
+            let resourceIds = results.valueForKeyPath(kPALResourceIdentifierAttributeName) as [NSString]
+            
+            let managedObjects = resourceIds.map({ (resourceId: NSString) -> NSManagedObject in
                 let objectId = self.objectIDForEntity(fetchRequest.entity!, withResourceIdentifier: resourceId)
                 let managedObject = context.objectWithID(objectId!) as Palette
-
+                
                 let predicate = NSPredicate(format: "%K = %@", kPALResourceIdentifierAttributeName, resourceId)
                 let backingObj = results.filteredArrayUsingPredicate(predicate!).first as Palette
                 
                 managedObject.transform(palette: backingObj)
-                managedObjs.append(managedObject)
-            }
-            return managedObjs
+                return managedObject
+            })
+            
+            return managedObjects
         }
         else if fetchRequest.resultType == .ManagedObjectIDResultType {
             let objectIds = backingContext.executeFetchRequest(fetchRequest, error: &error)

        
        NetworkController.task(httpRequest, completion: { (data, error) -> Void in
            var err: NSError?
            let jsonResult = NSJSONSerialization.JSONObjectWithData(data, options: nil, error: &err) as NSArray
            
            var palettes: [AnyObject] = []
            for obj in jsonResult {
                if let paletteObj = obj as? NSDictionary {
                    palettes.append(paletteObj)
                }
            }
            
            context.performBlockAndWait(){
                let childContext = NSManagedObjectContext(concurrencyType: .PrivateQueueConcurrencyType)

        
        var error: NSError? = nil
        let privateContext = self.backingManagedObjectContext
        privateContext.performBlockAndWait() {
            if let results = privateContext.executeFetchRequest(fetchRequest, error: &error) {
                backingObjectId = results.last as? NSManagedObjectID
            }
