   ###
   @template=@::template=( path, fn )->
     # console.log "Factory.template( #{path} )"
-    require ['templates/' + path], ( template )->
-      fn template
-    , (err)->
-      console.error 'Template not found: ' + path
-      fn null
+    classpath = 'templates/' + path
 
-
-
-  ###*
-  Returns an AMD compiled style.
-
-  @method style
-  @param path {String} Path to the style.
-  @param fn {Function} Callback function returning the style string.
-  ###
-  @style=@::style=( path, fn )->
-    # console.log "Factory.template( #{path} )"
-    require ['styles/' + path], ( style )->
-      fn style
-    , (err)->
-      console.error 'Style not found: ' + path
-      fn null
+    if (template = require classpath) is null
+      console.error 'Template not found: ' + classpath
+      return fn null
+    
+    fn template
    namespace = parts[parts.length - 1]
    classpath = "app/views/#{path}"

    require ['app/views/app_view', classpath], ( AppView, View )=>
      unless (view = new View) instanceof View
        msg = "#{classpath} is not a View instance - you probably forgot to "
        msg += "extend thoricus/mvc/View"
        console.error msg

      # defaults to AppView if given view is not found
      # (cant see any sense on this, will probably be removed later)
      view = new AppView unless view?

      view._boot @the
      view.classpath = classpath
      view.classname = classname
      view.namespace = namespace

      fn view

    , (err)->
      console.error 'View not found: ' + classpath
      fn null


  ###*

    classname = name.camelize()
    classpath = "app/models/#{name}".toLowerCase()

    if (ModelClass = require classpath) is null
      console.error "Model not found '#{classpath}'"
      return fn null

    unless (model = new ModelClass) instanceof Model
      msg = "#{classpath} is not a Model instance, you probably forgot to "
      msg += "extend thoricus/mvc/Model"
      console.error msg
      return fn null

    model.classpath = classpath
    model.classname = classname
    model[prop] = value for prop, value of init

    fn model

  ###*
  Loads and returns an instantiated {{#crossLink "View"}} __View__  {{/crossLink}} given the name. 
