     else
       # log "singleton registered! KD.singletons[\"#{singletonName}\"]"
       KD.singletons[singletonName] = object
-      
+
   getSingleton:(singletonName)->
     if KD.singletons[singletonName]?
-      KD.singletons[singletonName] 
+      KD.singletons[singletonName]
     else
       warn "\"#{singletonName}\" singleton doesn't exist!"
       null
-  
+
   emptyDataCache:()->
     for own id,object of @getAllKDInstances
       if object instanceof KDData
         object.destroy()
-  
+
   getAllKDInstances:()-> KD.instances
 
   getKDViewInstanceFromDomElement:(domElement)->

# if location.hostname is "localhost"
# window.onerror = (desc,page,line,chr)=> alert "Line: #{line}, desc: #{desc}, chr:#{chr}, page:#{page}"

Function::bind or= do ->  
  {slice} = []
  (context)->
    func = @

        inflated = JSONH.unpack data
        console.log 'success', inflated
        console.log Date.now()-start

  registerPage:(name,classFunction)->
    # log "registering a page",name
    @pageClasses ?= {}
