 ###
 classPropertyNameMap = ( controlClass ) ->
   className = controlClass.className
-  unless propertyNameMaps[className]
+  unless propertyNameMaps[ className ]
     map = {}
     # Use the names on the control class' prototype for reference.
     for mixedCaseName of controlClass::
       lowerCaseName = mixedCaseName.toLowerCase()
-      map[lowerCaseName] = mixedCaseName
-    propertyNameMaps[className] = map
-  propertyNameMaps[className]
+      map[ lowerCaseName ] = mixedCaseName
+    propertyNameMaps[ className ] = map
+  propertyNameMaps[ className ]
 
 
 ###

  controlClass = Control.getClass className
  # Extract properties. Compound properties ( those defined in children )
  # will get removed from the control content at this point.
  lowerCaseProperties = $.extend(
    {},
    getPropertiesFromAttributes( element ),
    getCompoundPropertiesFromChildren( element )
  )
  properties = restorePropertyCase controlClass, lowerCaseProperties
  # Create the control.
  $( element ).control controlClass, properties


###

###
getCompoundPropertiesFromChildren = ( element ) ->
  properties = {}
  $compoundElements = Control( element ).children().filter "[data-property]" 
  for $compound in $compoundElements.each()
    propertyName = $compound.attr "data-property"
    if propertyName isnt "control" # data-control means a control, not a property.
      $value = $compound.content()
      properties[ propertyName ] = $value
      # Detach before removing so we preserve subcontrols.      
      $value.detach() if $value instanceof jQuery
  $compoundElements.remove()
