     'ms'
   ]
 
-  @doc = document.getElementById target
-  
+  #toggle easing
+  @useEasing = true
+
+  @doc = document.getElementById target  
   startVal = Number startVal  
   endVal = Number endVal
   @countDown = if (startVal > endVal) then true else false
-
-  #toggle easing
-  @useEasing = true
-
   decimals = Math.max(0, decimals or 0)
   @dec = Math.pow(10, decimals)
   @duration = duration * 1000 or 2000
-
   @startTime = null
+  @remaining = null
   @frameVal = startVal
-
-  @.rAF = null
+  @rAF = null
 
   # make sure requestAnimationFrame and cancelAnimationFrame are defined
   # polyfill for browsers without native support

      x1 = x1.replace(rgx, '$1' + ',' + '$2')

    x1 + x2


  @reset = () ->
    cancelAnimationFrame @rAF
    @doc.innerHTML = @addCommas startVal.toFixed(decimals)

  @resume = () ->
    @startTime = null
    @duration = @remaining
    @startVal = @framVal
    requestAnimationFrame @count

  @addCommas = (nStr) ->
    nStr += ''
