     return
 
   _configurePlugins: (plugins) ->
-    for own pluginId, pluginConfig of plugins
-      pluginConfig.type = pluginId
+    for own pluginId, config of plugins
+      config.type = pluginId
       plugin = @_loadPlugin pluginId
-      plugin.configure @, pluginConfig
+      plugin.configure @, config
     return
 
   ###

    return plugin

  getPlugin: (id, tryToLoad = false) ->
    @_loadPlugin id if !@plugins[id] and tryToLoad
    @plugins[id]

  getTasks: -> @tasks

  getPlugins: -> (plugin for own pluginId, plugin of @plugins)

  start: ->
    for own pluginId, plugin of @plugins
      plugin.start()

exports.App = App
  taskBuilder: null

  constructor: (@emitter) ->
    @plugins = []
    @tasks = []
    @pluginBuilder = new BeanBuilder basePath: "#{__dirname}/plugins", suffix: 'plugin'
    @taskBuilder = new BeanBuilder basePath: "#{__dirname}/tasks", suffix: 'task'
