     .createFlow (flow) =>
       flow.execute =>
         code.apply(@, args)
-    .then (result) -> 
+    .then (result) ->
       successCallback null, result
     , errCallback
 


module.exports = ->
  @Driver = Driver
  
  _Before = @Before
  _After  = @After


      @driver.visit = @driver.get

  @After ->
    if @driver?
      terminateDriver() unless shouldPreventBrowserReload()

  @registerHandler "AfterFeatures", (event, callback) =>
    if shouldPreventBrowserReload() and @driver?
      terminateDriver().then callback
    else
      callback()

