     define: define
     templateEngine: Handlebars
     domFind: undefined
+    deferred: undefined
     initialize: (app) ->
       module.domFind = app.core.dom.find
       module.deferred = app.core.data.deferred
       app.core.template.load = (names=[], ref, el, format="hbs") ->
         names = [names] if _.isString(names)
         componentName = ref.replace('__component__$', '').split('@')[0]
-        dfd   = app.core.data.deferred()
+        dfd = app.core.data.deferred()
         tpls = _.map names, _.bind(lookupTemplate, undefined, componentName, el, ref, format)
-        app.core.data.when.apply(undefined, tpls).then ->
-          dfd.resolve _.object names, [].slice.apply(arguments)
+        app.core.data.when(tpls...).then ->
+          dfd.resolve _.object(names, [].slice.apply(arguments))
         , (err)->
-          dfd.reject(err)
+          dfd.reject err
         dfd.promise()
   module

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

  appStrategies = ['hullGlobal', 'meteor', 'sprockets', 'hullDefault']
  domStrategies = ['inner', 'global']
  serverStrategies = ['require']

  #Compiles the template depending on its definition
  setupTemplate = (tplSrc, tplName) ->

          dfd.reject err 
        dfd

  _execute = (type, args...)->
    for stratName in strategies[type]
      strategyResult = strategyHandlers[type][stratName](args...)
      return strategyResult if strategyResult

  applyDomStrategies = (tplName, el)->
    selector = "script[data-hull-template='#{tplName}']"
    tpl = _execute('dom', selector, tplName, el)
    setupTemplate(tpl, tplName) if tpl

  applyAppStrategies = (tplName)->
    _execute('app', tplName)

  applyServerStrategies = (tplName, path, format)->
    _execute('server', tplName, path, format)


  lookupTemplate = (componentName, el, ref, format, name)->
