         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 =

define ['underscore', 'lib/hullbase', 'handlebars'], (_, Hull, Handlebars) ->

  strategies =
    app: ['hullGlobal', 'meteor', 'sprockets', 'hullDefault']
    dom: ['inner', 'global']
    server: ['require']
