 replace = (html, options = {}) ->
   changePage createDocument(html), options
 
-changePage = (doc, options = {}) ->
+changePage = (doc, options) ->
   [title, targetBody, csrfToken, runScripts] = extractTitleAndBody(doc)
   title ?= options.title
 

  triggerEvent EVENTS.UPDATE

findNodes = (body, selector) ->
  node for node in body.querySelectorAll(selector)

findNodesMatchingKeys = (body, keys) ->
  matchingNodes = []

    progressBar?.uninstall()
    progressBar = null

fetchReplacement = (url, options) ->
  options.showProgressBar ?= true

  triggerEvent EVENTS.FETCH, url: url.absolute

