         type = attributes.type or defaulttype
         handler = 
           name: attributes.name
-          script: script
+          script: transformScript(script, type)
           args: args
-          type: type
 
         classattributes.$handlers.push(handler)
         # console.log 'added handler', attributes.name, script, attributes

        args = (attributes.args ? '').split()
        script = htmlDecode(child.innerHTML)
        type = attributes.type or defaulttype
        classattributes.$methods[attributes.name] = [script, args, type]
        # console.log 'added method', attributes.name, script, classattributes
      else if childname == 'setter'
        args = (attributes.args ? '').split()
        script = htmlDecode(child.innerHTML)
        type = attributes.type or defaulttype
        classattributes.$methods['set_' + attributes.name] = [script, args, type]
        # console.log 'added setter', 'set_' + attributes.name, args, classattributes.$methods
      else if childname == 'attribute'
        classattributes[attributes.name] = attributes.value

      # console.log coffeeCache
      # return coffeeCache[script]

  transformScript = (script='', compiler) ->
    return script unless compiler of compilermappings
    script = compilermappings[compiler](script) 

  compileScript = (script='', args=[]) ->
    # console.log 'compileScript', compiler, args, script
    try 
      new Function(args, script)
