     steroids.nativeBridge.nativeCall
       method: "openLayer"
       parameters: parameters
-      successCallbacks: [defaultOnSuccess, callbacks.onSuccess]
+      successCallbacks: [callbacks.onSuccess]
       failureCallbacks: [callbacks.onFailure]
 
-  replace: (options={}, callbacks={})->
+  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: ->
    @array = []

  pop: (options={}, callbacks={})->
    defaultOnSuccess = ()=>
      @array.pop()

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

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

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