     }
     
     func new(uniqueID: String,changedObject: NSManagedObject)  -> Change {
-      if changedObject.inserted {
-        return new(uniqueID,type: ChangeType.Inserted,
+      if changedObject.isInserted {
+        return new(uniqueID: uniqueID,type: ChangeType.Inserted,
           entityName: changedObject.entity.name!)
-      } else if changedObject.updated {
-        let change = new(uniqueID, type: Change.ChangeType.Updated, entityName: changedObject.entity.name!)
+      } else if changedObject.isUpdated {
+        let change = new(uniqueID: uniqueID, type: Change.ChangeType.Updated, entityName: changedObject.entity.name!)
         change.addProperties(changedObject.changedValueKeys)
         return change
       } else {
-        return new(uniqueID, type: Change.ChangeType.Deleted, entityName: changedObject.entity.name!)
+        return new(uniqueID: uniqueID, type: Change.ChangeType.Deleted, entityName: changedObject.entity.name!)
       }
     }
     
     func all() throws -> [Change]? {
-      let fetchRequest = NSFetchRequest(entityName: Entity.name)
+      let fetchRequest = Change.fetchRequest()
       fetchRequest.fetchLimit = 50
-      return try changeContext.executeFetchRequest(fetchRequest) as? [Change]
+      
+      return try changeContext.fetch(fetchRequest) as? [Change]
     }
     
     func all(forUniqueID uniqueID: String, type: NSNumber) throws -> [Change]? {
-      let fetchRequest = NSFetchRequest(entityName: Entity.name)
+      let fetchRequest = Change.fetchRequest()
       fetchRequest.fetchBatchSize = 50
       fetchRequest.predicate = NSPredicate(equalsToUniqueID: uniqueID, andChangeType: type)
-      return try changeContext.executeFetchRequest(fetchRequest) as? [Change]
+
+      return try changeContext.fetch(fetchRequest) as? [Change]
     }
     
     func allUpdatedType(forUniqueID uniqueID: String) throws -> [Change]? {

      static var attributeDescription: NSAttributeDescription {
        let attributeDescription = NSAttributeDescription()
        attributeDescription.name = name
        attributeDescription.attributeType = .StringAttributeType
        attributeDescription.optional = true
        return attributeDescription
      }
    }

    }
    
    func remove(changes: [Change]) {
      changes.forEach { changeContext.delete($0) }
    }
    
    func changedPropertyValuesDictionaryForChange(change: Change, changedObject: NSManagedObject) -> [String: AnyObject]? {
      if let changedProperties = change.separatedProperties, change.isUpdatedType {
        return changedObject.dictionaryWithValues(forKeys: changedProperties) as [String : AnyObject]
        
      } else  {
        let keys = Array(changedObject.entity.attributesByName.keys) + changedObject.entity.toOneRelationshipNames
        
        return changedObject.dictionaryWithValues(forKeys: keys) as [String : AnyObject]
      }
    }
  }
