 
     #derive: (parentName, name, constructor, instanceMembers, staticMembers) ->
 
-    Gizmo : gremlinDefinitions.Gizmo
-       
-    # @property [util.Helper] The person name
-    # @see util.Helper
+    Gizmo: gremlinDefinitions.Gizmo
     Helper: util.Helper
-
+    Module: modules.Module
     namespace: namespace
-    ns : namespace
+    ns: namespace
     Package: packages.Package
 
-    Module: modules.Module
+  g = new GremlinAdapter
 
-      
-  g = new GremlinAdapter
-  
   util.ready ->
     app = new Application()
     isDebug = app.configuration.get conf.Configuration.options.DEBUG


    app.start()
    g.debug.console.log "gremlin.js up and running..."
    
  return g

window.Gremlin = Gremlin

Gremlin = do ->
  app = null

  class GremlinAdapter extends EventDispatcher

    ON_ELEMENT_FOUND: 'elementfound'
    ON_DEFINITION_PENDING: 'definitionpending'
    ON_GREMLIN_LOADED: 'gremlinloaded'

    constructor: ->
      super
      @debug = new util.Debug false

    add: (name, GremlinClass) ->
      GremlinClass = gremlinDefinitions.Pool.getInstance().addClass name, GremlinClass
      app?.refresh()
      GremlinClass
