     case Loading
 }
 
-public struct QueryResultsControllerEvent {
+public struct QueryResultsControllerEvent<T> {
     
     // Request Callback
     
     /// Informs the delegate that a search request has completed with the specified error (if any).
-    public var didRefresh: ((error: ErrorType?) -> ()) = { (error) in }
-    
-    public var didLoadCursor: ((error: ErrorType?) -> ()) = { (error) in }
+    public var didRefresh: (ErrorValue<[T]>) -> () = { (error) in }
+    
+    public var didLoadCursor: (ErrorValue<[T]>) -> () = { (error) in }
     
     // Change Notification Callbacks
     
-    public var willChangeContent: (() -> ()) = { }
-    
-    public var didChangeContent: (() -> ()) = { }
+    public var willChangeContent: () -> () = { }
+    
+    public var didChangeContent: () -> () = { }
     
     public var didInsert: ((index: Int) -> ()) = { (index) in }
     

            
        case .Initial:
            
            defer { self.state = .Loaded }
            
            // fetch from cache
            do { try self.fetchedResultsController.performFetch() }
                
            catch { fatalError("Could not fetch from managed object context. \(error)") }
            
        case .Loaded: break
        }
        
        // reset cursor
        self.queryCursor = nil
        
        // fetch from server
        self.store.search(.Query(query), resultsLimit: queryResultsLimit, zoneID: zoneID) { [weak self] (response: ErrorValue<([T], CKQueryCursor?)>) in
            
            guard let controller = self else { return }
            
            switch response {
                
            case let .Error(error):
                
                controller.event.didRefresh(error: error)
                
            case let .Value(_, cursor):
                
                controller.queryCursor = cursor
                
                controller.event.didRefresh(error: nil)
            }
        }
    }
    

        forChangeType type: NSFetchedResultsChangeType,
        newIndexPath: NSIndexPath?) {
            
            switch self.state {
                
            case .Initial: break // ignore, events will be called manually
                
            case .Loaded: break // no ongoing requests, should update from cache
                
            case .Refreshing: break // provide update animations
                
            case .LoadingCursor: return // ignore, will load more from server
            }
            
            switch type {
                
            case .Insert:
