     loadTemplates this, callback
 
   getLocals: (callback) ->
-    ### Resolve locals. ###
-
-    resolveLocals = (callback) =>
-      ### Load locals json if neccessary. ###
-      if typeof @config.locals == 'string'
-        filename = @resolvePath @config.locals
-        @logger.verbose "loading locals from: #{ filename }"
-        readJSON filename, callback
-      else
-        callback null, @config.locals
-
-    addModules = (locals, callback) =>
-      ### Loads and adds modules specefied with the require option to the locals context. ###
-      async.forEach Object.keys(@config.require), (alias, callback) =>
-        module = @config.require[alias]
-        logger.verbose "loading module '#{ module }' available in locals as '#{ alias }'"
-        @loadModule module, (error, result) ->
-          if not error?
-            if locals[alias]?
-              logger.warn "module '#{ module }' overwrites previous local with the same key ('#{ alias }')"
-            locals[alias] = result
-          else
-            error.message = "Error loading module '#{ module }': #{ error.message }"
-          callback error
-      , (error) -> callback error, locals
-
-    async.waterfall [
-      resolveLocals
-      addModules
-    ], callback
+    ### Returns locals. ###
+    # TODO: locals are no longer loaded async, this method should eventually be removed
+    callback null, @locals
 
   load: (callback) ->
     ### Convenience method to load plugins, views, contents, templates and locals. ###

      @logger.verbose "unloading: #{ id }"
      delete require.cache[id]

  setConfig: (@config) ->
    @contentsPath = @resolvePath @config.contents
    @templatesPath = @resolvePath @config.templates

  resolvePath: (pathname) ->
    ### Resolve *pathname* in working directory, returns an absolute path. ###

      groups.push generator.group unless generator.group in groups
    return groups

  loadModule: (module) ->
    ### Requires and returns *module*, resolved from the current working directory. ###
    require 'coffee-script' if module[-7..] is '.coffee'
    @logger.silly "loading module: #{ module }"
    id = @resolveModule module
    @logger.silly "resolved: #{ id }"
    rv = require id
    @loadedModules.push id
    return rv

  loadPluginModule: (module, callback) ->
    ### Load a plugin *module*. Calls *callback* when plugin is done loading, or an error ocurred. ###
    if typeof module is 'string'
      try
        module = @loadModule module
      catch error
        callback error
        return

    module.call null, this, (error) ->
      error.message = "Error loading plugin '#{ module }': #{ error.message }" if error?
      callback error

  loadViewModule: (id, callback) ->
    ### Load a view *module* and add it to the environment. ###
    @logger.verbose "loading view: #{ id }"
    try
      module = @loadModule id
    catch error
      error.message = "Error loading view '#{ id }': #{ error.message }"
      callback error
      return
    @registerView path.basename(id), module
    callback()

  loadPlugins: (callback) ->
    ### Loads any plugin found in *@config.plugins*. ###
