     steroids.nativeBridge.nativeCall
       method: "replaceLayers"
       parameters: parameters
-      successCallbacks: [defaultOnSuccess, callbacks.onSuccess]
+      successCallbacks: [callbacks.onSuccess]
       failureCallbacks: [callbacks.onFailure]

    steroids.nativeBridge.nativeCall
      method: "openLayer"
      parameters: parameters
      successCallbacks: [defaultOnSuccess, callbacks.onSuccess]
      failureCallbacks: [callbacks.onFailure]

  replace: (options={}, callbacks={})->
    steroids.debug "steroids.layers.replace called"

    defaultOnSuccess = ()=>
      steroids.debug "steroids.layers.replace defaultOnSuccess"
      @array = [view]

    view = if options.constructor.name == "WebView"
      steroids.debug "steroids.layers.replace using view shorthand"

class LayerCollection
  constructor: ->

  pop: (options={}, callbacks={}) ->

    steroids.nativeBridge.nativeCall
      method: "popLayer"
      successCallbacks: [callbacks.onSuccess]
      failureCallbacks: [callbacks.onFailure]

  popAll: (options={}, callbacks={}) ->
