;
(function(mag) {

  "use strict";

  var mod = {
    modules: [],
    promises: [],
    deferreds: [],
    controllers: [],
    elements: []
  }

  mod.getController = function(mod, element, fill) {
    var controller

    // FireFox support only
    // Removing since we are now native with Object.observe which is only Chrome & Opera

    if (typeof Proxy !== 'undefined') {
      controller = new Proxy(new mod.controller, {
        get: function(target, prop) {
          if (target[prop] === undefined && ['watchers', 'toJSON', 'called', 'onload', 'onunload'].indexOf(prop) === -1) {
            var a = fill.find(element, prop),
              greedy = prop[0] === '$',
              v, // can be an array, object or string
              // for each
              tmp = []
              a.forEach(function(item, index) {
                if (a[index]) {
                  if (a[index].value && a[index].value.length > 0) {
                    v = a[index].value
                    if (a[index].type && (a[index].type == 'checkbox' || a[index].type == 'radio')) {
                      v = {
                        _text: v,
                        _checked: a[index].checked
                      }
                      tmp.push(v)
                    }
                  } else if (a[index].innerText && a[index].innerText.length > 0) {
                    v = a[index].innerText
                  } else if (a[0].innerHTML && a[index].innerHTML.length > 0) {
                    v = a[index].innerHTML
                  }
                }
              })
              if (tmp.length > 0 && greedy) return tmp
              return v
          }
          return target[prop]
        }
      })
    } else {
      controller = new mod.controller
    }

    //controller = new mod.controller
    return controller
  }

  mod.submodule = function(module, args) {

    var controller = function(args) {
      return (module.controller || function() {}).apply(this, args)
    }.bind({}, args)

    var view = function(ctrl, ele) {

      if (arguments.length > 1) var nargs = args.concat([].slice.call(arguments, 1))
      var template = module.view.apply(module, nargs ? [ctrl].concat(nargs) : [ctrl])

      if (args[0] && args[0].key != null) template.attrs.key = args[0].key
      // There's no template return ??
      //return template
    }
    controller.$original = module.controller
    controller.$$args = args
    var output = {
      controller: controller,
      view: view
    }
    if (args[0] && args[0].key != null) output.attrs = {
      key: args[0].key
    }
    return output
  }

  mod.getArgs = function(i) {
    var args = mod.modules[i].controller && mod.modules[i].controller.$$args ? [mod.controllers[i]].concat(mod.modules[i].controller.$$args) : [mod.controllers[i]]
    // args that contaian circular references will throw an exception up the chain
    // TODO: filter for circular references such as DOM nodes

    return args
  }
  mag.mod = mod

})(window.mag || {})

@@ -137,24 +137,25 @@
 ts: %5B%5D%0A  %7D%0A%0A
+%0A
   mod.getCon
@@ -1820,24 +1820,619 @@
 roller%0A  %7D%0A%0A
+  function deepFreeze(o) %7B%0A    var prop, propKey;%0A    Object.freeze(o); // First freeze the object.%0A    for (propKey in o) %7B%0A      prop = o%5BpropKey%5D;%0A      if (!o.hasOwnProperty(propKey) %7C%7C !(typeof prop === 'object') %7C%7C Object.isFrozen(prop)) %7B%0A        // If the object is on the prototype, not an object, or is already frozen,%0A        // skip it. Note that this might leave an unfrozen reference somewhere in the%0A        // object if there is an already frozen object containing an unfrozen object.%0A        continue;%0A      %7D%0A%0A      deepFreeze(prop); // Recursively call deepFreeze.%0A    %7D%0A  %7D%0A%0A
   mod.submod
@@ -2459,24 +2459,48 @@
 e, args) %7B%0A%0A
+%0A    deepFreeze(args)%0A%0A%0A
     var cont
@@ -3043,16 +3043,17 @@
  = args%0A
+%0A
     var 
@@ -3419,16 +3419,16 @@
 ers%5Bi%5D%5D%0A
+
     // a
@@ -3505,70 +3505,8 @@
 hain
-%0A    // TODO: filter for circular references such as DOM nodes
 %0A%0A  

Update module.js