       pin keyed if pin? # Update pin with keyed
       children: root # Return in format appropriate for mapping
 
-    mapping =
-      #children:
-      #  key: (data) ->
-      #    ko.utils.unwrapObservable data.id
-      #  create: (options) ->
-      #    createNode options
-        #update: (options) ->
-        #  createNode options
-
-    createNode = (options) ->
-      #node = options.data
-      #console.log "Extending: ", node
-      #$.extend node,
-      #  servers: v for k,v of node?.children ? {} when "agent" in v.facts.backends
-      #  containers: v for k,v of node?.children ? {} when "container" in v.facts.backends
-      #  actions: []
-      #  status: "unknown"
-      #ko.mapping.fromJS node, mapping
-
     @updateNodes = (data, pin, keys) =>
-      @mapData @parseNodes(data, pin, keys), pin #, mapping
+      @mapData @parseNodes(data, pin, keys), pin
 
     @getNodes = (url, pin, keys) =>
       @getData url, (data) =>

        value: parent
        node_id: options.item.id()
    , (data) ->
      null
      #console.log "Success: ", data
    , (jqXHR) ->
      console.log "Error: ", jqXHR


    @wsKeys = {}

    @updateTransaction = (data) =>
      if data?.transaction?
        @sKey = data.transaction.session_key
        @txID = data.transaction.txid

    @poll = (url, cb, timeout=@config?.timeout?.long) =>
      rePoll = (throttle=false, update=false) =>
        doit = (=> @poll "/roush/nodes/updates/#{@sKey}/#{@txID}?poll", cb, timeout)
        if update?
          @getData "/roush/updates", (data) =>
            @updateTransaction data
            setTimeout doit, 1 unless throttle else 1000
        else
          setTimeout doit, 1 unless throttle else 1000

      $.ajax
        url: url
