   init()
 
 handlePageChange = ->
-  reset()
-  go()
-
-go = ->
+  Pace.reset()
+  Pace.go()
+
+Page.go = ->
   bar.render()
 
   cancelAnimation = false


      setTimeout ->
        bar.finish()
      , Math.max(GHOST_TIME, Math.min(MIN_TIME, now() - start))
    else
      enqueueNextFrame()

do check = ->
  bar.render()

  # It's usually possible to render a bit before the document declares itself ready
  if not document.querySelector('.pace')
    setTimeout check, 50
  else
    go()


      if @sinceLastUpdate
        @rate = (val - @last) / @sinceLastUpdate

      @catchup = (val - @progress) / options.catchupTime

      @sinceLastUpdate = 0
      @last = val

    if val > @progress
      # After we've got a datapoint, we have catchupTime to
      # get the progress bar to reflect that new data
      @progress += @catchup * frameTime

    scaling = (1 - Math.pow(@progress / 100, options.easeFactor))

    # Based on the rate of the last update, we preemptively update
    # the progress bar, scaling it so it can never hit 100% until we
