   # Cache and queue definition
   cache = {}
   queue = {}
+  
+  # Plugin object
+  plugins = {}
 
   # Molo base object
   root.molo = {}

  mainHasBeenCalled = false
  
  root.molo.main = (name, callback) ->
    if mainHasBeenCalled then throw new TypeError('molo.main can only be called once.')

    root.molo.require name, callback
    

  # Delete a single module from cache, which forces it to
  # reload this module if it comes up as a dependency the
  # next time
  root.molo.delete = root.molo.invalidate = (name) ->
    delete cache[name] if cache[name]
    delete queue[name] if queue[name]

  # Plugin connector
  root.molo.plugins =
    add: (pluginName, pluginFunc) -> plugins[pluginName] = pluginFunc
    delete: (p) -> delete plugins[p] if plugins[p]

  # Completely clear all caches
  root.molo.clear = ->
