     module.define path, parsed
     parsed
 
-  module = 
+  module =
     global: window
     require: require
     define: define
     templateEngine: Handlebars
-    getTemplateDefinition: _getTemplateDefinition 
+    getTemplateDefinition: _getTemplateDefinition
     initialize: (app) ->
       app.core.template.load = (names=[], ref, format="hbs") ->
         undefinedTemplates = []

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

  #Compiles the template depending on its definition
  setupTemplate = (tplSrc, tplName) ->
    engine = module.templateEngine 
    tplName = tplName.replace(/\//g,'.',)
    if (_.isFunction(tplSrc))
      compiled = engine.template tplSrc

    engine.registerPartial(tplName, compiled)
    compiled

  # Handles the various priorities and locations of templates
  _getTemplateDefinition = (name, ref, widgetName, dom)->
    path = "#{ref}/#{name}"
    tplName = [widgetName, name.replace(/^_/, '')].join("/")
