   
   func addProperties(props: [String]) {
     guard let separatedProperties = separatedProperties else {
-      properties = props.joinWithSeparator(Change.propertySeparator)
+      properties = props.joined(separator: Change.propertySeparator)
       return
     }
     let union = Set(separatedProperties).union(Set(props))
-    properties = union.joinWithSeparator(Change.propertySeparator)
+    properties = union.joined(separator: Change.propertySeparator)
   }
   
   struct ChangeType {
-    static let Inserted = NSNumber(int: 0)
-    static let Updated = NSNumber(int: 1)
-    static let Deleted = NSNumber(int: 2)
+    static let Inserted = NSNumber(value: 0)
+    static let Updated = NSNumber(value: 1)
+    static let Deleted = NSNumber(value: 2)
   }
   static let propertySeparator = ","
   

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

    }
    
    func new(uniqueID: String,changedObject: NSManagedObject)  -> Change {
      if changedObject.isInserted {
        return new(uniqueID: uniqueID,type: ChangeType.Inserted,
          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: uniqueID, type: Change.ChangeType.Deleted, entityName: changedObject.entity.name!)
      }
    }
    
    func all() throws -> [Change]? {
      let fetchRequest = Change.fetchRequest()
      fetchRequest.fetchLimit = 50
      
      return try changeContext.fetch(fetchRequest) as? [Change]
    }
    
    func all(forUniqueID uniqueID: String, type: NSNumber) throws -> [Change]? {
      let fetchRequest = Change.fetchRequest()
      fetchRequest.fetchBatchSize = 50
      fetchRequest.predicate = NSPredicate(equalsToUniqueID: uniqueID, andChangeType: type)

      return try changeContext.fetch(fetchRequest) as? [Change]
    }
    
    func allUpdatedType(forUniqueID uniqueID: String) throws -> [Change]? {
