         path = "text!#{path}.#{format}"
         dfd = module.deferred()
         module.require [path], (tpl)->
-          dfd.resolve setupTemplate(tpl, tplName) 
+          dfd.resolve setupTemplate(tpl, tplName)
         , (err)->
-          console.error "Error loading template", tplName, err.message 
-          dfd.reject err 
+          console.error "Error loading template", tplName, err.message
+          dfd.reject err
         dfd
 
   _execute = (type, args...)->

    _execute('server', tplName, path, format)


  lookupTemplate = (componentName, el, ref, format, name)->
    path = "#{ref}/#{name}"
    tplName = [componentName, name.replace(/^_/, '')].join("/")

    tpl = applyDomStrategies tplName, el if module.domFind
    tpl = applyAppStrategies tplName unless tpl

    module.define path, tpl if tpl

    tpl = applyServerStrategies tplName, path, format unless tpl
    tpl

  module =

      module.domFind = app.core.dom.find
      module.deferred = app.core.data.deferred
      app.core.template.load = (names=[], ref, el, format="hbs") ->
        dfd = app.core.data.deferred()
        names = [names] if _.isString(names)
        componentProps =
          componentName: ref.replace('__component__$', '').split('@')[0]
          templateFormat: format
          rootEl: el
          ref: ref

        tpls = _.map names, _.bind(lookupTemplate, undefined, componentProps)
        app.core.data.when(tpls...).then ->
          dfd.resolve _.object(names, [].slice.apply(arguments))
        , (err)->
