 
 # oj.View
 # ------------------------------------------------------------------------------
-# Properties
-#   $el           Reference el
-#   attributes    Initialize from element, $(selector), or ojml
-
-# Methods
-#   css
 
 oj.View = oj.type 'View',
 
   # Views are special objects map properties together. This is a union of arguments
   # With the remaining arguments becoming a list
 
-  constructor: ->
+  constructor: (args = {}) ->
     # console.log "View.constructor: ", JSON.stringify arguments
+
+    throw new Error("oj.#{@typeName}: constructor did not set this.el") unless oj.isDOM @el
 
     # Views act like tag methods and support the div -> syntax.
     # Append this to parent
     _.argumentsAppend @
 
-    # Simplify arguments to a single object of properties and a single list of arguments
-    unionArguments = _.unionArguments arguments
-
-    {options, args} = unionArguments
-
     # Generate id if missing
-    options.id ?= oj.id()
+    args.id ?= oj.id()
+
+    # Add typeName class
+    @$el.addClass @typeName
 
     # Views automatically set all options to their properties
     # arguments directly to properties
-    @set options
+    @set args
 
     # Remove options that were set
-    options = _.omit options, @properties...
+    args = _.omit args, @properties...
 
     # Views pass through remaining options to be attributes on the root element
     # This can include jquery events and interpreted arguments
-    @attributes = options
+    @addAttributes args
 
   properties:
-    el:
-      get: ->
-        # Use the cached version if possible
-        return @_el if oj.isDOMElement @_el
-
-        # Otherwise create it with @make
-        # Wrapped with push/pop to ensure we don't emit outside of ourselves
-        _.argumentsPush()
-        ojml = @make()
-        _.argumentsPop()
-        dom = (oj.compile dom:true, html:false, css:false, ojml).dom
-
-        # Add id and type if necessary
-        $dom = $(dom)
-        if not $dom.attr 'id'
-          $dom.attr id:oj.id()
-        $dom.addClass @typeName
-
-        @_el = dom
+    # Get element
+    el: null
+
+    # Get jquery-enabled element (readonly)
     $el:
       get: -> $(@el)
 
+    # Get all attributes (readonly)
     attributes:
       get: ->
         out = {}
         $.each @el.attributes, (index, attr) -> out[ attr.name ] = attr.value;
         out
-      set: (v) -> @addAttributes v; return
 
   methods:
-    # make: Return ojml that creates initial dom state
-    # Override this to create your own structure
-    make: -> oj.div c:@typeName, id:@id ? oj.id()
-
-    # Find sub elements via jquery selector
+
+    # Mirror backbone find sub elements via jquery selector
     $: -> @$el.find.apply @, arguments
 
+    # Add a single attribute
     addAttribute: (name,value) ->
       attr = {}
       attr[name] = value

            oj.option op
          return
        return

  methods:
    make: -> oj.select change: => @viewChange(); return

# oj.Table
# ------------------------------------------------------------------------------

  base: oj.ModelView

  constructor: (args) ->
    # console.log "ModelKeyView.constructor: ", JSON.stringify arguments
    @key = oj.argumentShift args, 'key'

    # Set live if it exists
    @live = oj.argumentShift args, 'live' if args?.live?

    # Call super to bind model and value
    oj.ModelKeyView.base.constructor.apply @, arguments
