     window.run grunt.file.read options.paths.emblem, 'utf8'
     if options.paths.ember
       window.run grunt.file.read options.paths.ember, 'utf8'
-      emberEnabled = true
+      templateBuilder = new EmberBuilder(window, rootPath: options.root)
     else
-      emberEnabled = false
+      templateBuilder = new VanillaBuilder(window, rootPath: options.root)
 
 
     grunt.verbose.writeflags(options, 'Options')

    else
      true

  isPartial = (filepath) ->
    isPartialFilename _.last filepath.split '/'

  isPartialFilename = (filename) ->
    regex = /^_/
    regex.test(filename)

      # iterate files, processing partials and templates separately
      f.src.filter(fileExists).forEach (filepath) ->
        src = grunt.file.read(filepath)

        try
          templates.push templateBuilder.build(src, filepath)
        catch e
          grunt.fail.warn e
          # Warn on and remove invalid source files (if nonull was set).
          grunt.fail.warn "Emblem failed to compile " + filepath + "."

      if templates.length < 1
        grunt.log.warn "
