             request.predicate = NSPredicate(format: "\(key) == \(parsedValue)")
             
             // Initialise a variable to hold the found/created managed objects.
-            var objects = [NSManagedObject]()
+            var objects = [AnyObject]()
             // Check if the fetch will return objects.
             if countForFetchRequest(request, error: error) == 0 {
                 // If there is no found object create and insert one.
-                if let newObject = NSEntityDescription.insertNewObjectForEntityForName(entityName, inManagedObjectContext: self) as? NSManagedObject {
-                    // Set the appropriate key-value pair.
-                    newObject.setValue(value, forKey: key)
-                    // Allow the caller to edit the new managed object.
-                    insert?(object: newObject)
-                    
-                    objects.append(newObject)
-                }
+                let newObject: AnyObject = NSEntityDescription.insertNewObjectForEntityForName(entityName, inManagedObjectContext: self)
+                // Set the appropriate key-value pair.
+                newObject.setValue(value, forKey: key)
+                // Allow the caller to edit the new managed object.
+                insert?(object: newObject)
+                
+                objects.append(newObject)
             } else {
                 // The objects exist so fetch them and store them if the fetch was successful.
-                if let results = executeFetchRequest(request, error: error) as? [NSManagedObject] {
+                if let results = executeFetchRequest(request, error: error) {
                     objects = results
                 }
             }

     *
     * :returns: An array with the found managed objects which match the given predicate.
     */
    public func findEntitiesForEntityName(entityName: String, withPredicate predicate: NSPredicate?, andSortDescriptors sortDescriptors: [NSSortDescriptor]?, error: NSErrorPointer) -> [NSManagedObject] {
        // Create a request with the appropriate information.
        let request = NSFetchRequest(entityName: entityName)
        request.predicate = predicate
        request.sortDescriptors = sortDescriptors
        
        // Execute the fetch request and attempt to downcast to an array of NSManagedObjects.
        let results = executeFetchRequest(request, error: error) as? [NSManagedObject]
        
        // Return the results or an empty array on fetch failure.
        return results != nil ? results! : [NSManagedObject]()
    }
    
    /**

        wherKey key: String,
        equalsValue value: AnyObject,
        error: NSErrorPointer,
        orInsert insert: ((object: AnyObject) -> Void)?) -> [AnyObject] {
            // Create a request with the appropriate information.
            let request = NSFetchRequest(entityName: entityName)
            
