   # where it should declare its variables, and a reference to the function that
   # it wraps.
   constructor: (@parent, @expressions, @method) ->
-    @variables = [{name: 'arguments', type: 'arguments'}]
+    @variables = []
     @positions = {}
     if @parent
-      {@garbage} = @parent
+      @garbage = @parent.garbage
     else
       @garbage   = []
       Scope.root = this
-  
+
   # Adds a new variable or overrides an existing one.
-  setVar: (name, type) ->
+  add: (name, type) ->
     if @positions.hasOwnProperty name
       @variables[@positions[name]].type = type
     else
-      @positions[name] = -1 + @variables.push {name, type}
+      @positions[name] = @variables.push({name, type}) - 1
     this
 
   # Create a new garbage level

  # Reserve a variable name as originating from a function parameter for this
  # scope. No `var` required for internal references.
  parameter: (name) ->
    @setVar name, 'param'

  # Just check to see if a variable has already been declared, without reserving,
  # walks up to the root scope.

      '_' + name + if index > 1 then index else ''
    else
      '_' + (index + parseInt name, 36).toString(36).replace /\d/g, 'a'

  # Gets the type of a variable.
  type: (name) ->
    for v in @variables when v.name is name then return v.type
    null

  # If we need to store an intermediate result, find an available name for a
  # compiler-generated variable. `_var`, `_var2`, and so on...
  freeVariable: (type) ->
    index = 0
    index++ while @check(temp = @temporary type, index) and @type(temp) isnt 'reuse'
    @add temp, 'var'
    last(@garbage)?.push temp
    temp

  # Ensure that an assignment is made at the top of this scope
  # (or at the top-level scope, if requested).
  assign: (name, value) ->
    @add name, value: value, assigned: true

  # Does this scope reference any variables that need to be declared in the
  # given function body?
