 
   templateFactory: ( data, options, templatePath, callback ) ->
     try
-      env = new nunjucks.Environment ( new nunjucks.FileSystemLoader ( path.dirname templatePath ) )
-      template = env.renderString data, options
+      template = @nunjucksEnv.renderString data, options
     catch e
       error = e
 

    else
      @nunjucksOptions = _.omit options, 'filePatterns', 'path'

  makeOptions: ( data ) ->
    # Allow for default data in the nunjucks options hash
    if @nunjucksOptions.locals?

      else
        callback null, "module.exports = #{template};"

    @templateFactory data, options, templatePath, successHandler
