           type = attributes.type ? defaulttype
           handler = 
             name: attributes.name
-            script: transformScript(script, type)
+            script: compiler.transform(script, type)
             args: args
             reference: attributes.reference
 

      # console.log 'new node', @, attributes
      @sendEvent('init', @)

    applyConstraint: (property, expression) ->
      @constraints ?= {}
      @constraints[property] = 
        expression: 'return ' + expression #compileScript('return ' + expression).bind(@)
      # console.log 'adding constraint', property, expression, @
        bindings: {}

      bindings = @constraints[property].bindings
      scopes = findPropertyBindings(expression)
      # console.log 'found scopes', scopes
      for scope in scopes
        bindexpression = scope.binding

        # Install methods
        for methodname, method of attributes.$methods
          # console.log 'installing method', methodname, method, @
          installMethod(@, methodname, compiler.compile.apply(null, method))
        delete attributes.$methods

      if attributes.$handlers
