     return plugin
 
   getPlugin: (id, tryToLoad = false) ->
-    @_loadPlugin id if !@plugins[id] and tryToLoad
-    @plugins[id]
+    @_loadPlugin(id) if tryToLoad and @_findPluginsById(id).length < 1
+    @_findPluginsById(id)[0]
 
   getTasks: -> @tasks
 
-  getPlugins: -> (plugin for own pluginId, plugin of @plugins)
+  getPlugins: -> @plugins
 
   start: ->
-    for own pluginId, plugin of @plugins
-      plugin.start()
+    plugin.start() for plugin in @plugins
+
+  stop: ->
+    plugin.stop() for plugin in @plugins
 
 exports.App = App
    for id in ids
      @_loadPlugin id

  _loadPlugin: (id) ->
    return @plugins[id] if @plugins[id]?
    plugin = @_buildPlugin type: id
    @plugins[id] = plugin
    plugin.initialize()
    return plugin


  taskBuilder: null

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