     syncOptions.data.search = @loadOptions.search if @loadOptions.search
     syncOptions
 
-  _success: ->
-    @successFunction.apply(this, arguments)
+  _success: (options, collection, data) ->
+    if data
+      data = data.models if data.models?
+      collection.setLoaded true, trigger: false
+      if collection.length
+        collection.add data
+      else
+        collection.reset data
+    collection.setLoaded true
+    options.success(collection) if options.success?
 
 ####################################
 

      opts = $.extend {}, options, include: include, success: (firstLayerCollection) =>
        @_success(options, collection, firstLayerCollection)

      cl = new Brainstem.CollectionLoader(storageManager: @storageManager, successFunction: @_success)
      cl.loadCollection(opts)

      # @_loadCollectionWithFirstLayer($.extend({}, options, include: include, success: ((firstLayerCollection) =>

class Brainstem.CollectionLoader
  constructor: (options = {}) ->
    @storageManager = options.storageManager

  _parseLoadOptions: (loadOptions) ->
    @loadOptions = $.extend {}, loadOptions
