       @updateNode(d)
       @centerNode(d)
 
-    # TODO doc string and better name
+    # Main handler of D3-afication of nodes. Takes a data node and adds it to
+    # the displayed set of data. Can be used to update what's currently displayed
+    # if the current state has changed to collapse or expand a node.
     updateNode: (source)->
       # Compute the new height, function counts total children of root node and sets tree height accordingly.
       # This prevents the layout looking squashed when new nodes are made visible or looking sparse when nodes are removed

      #   atom.notifications.addWarning "No data was captured for display", dismissable: true
      #   return

      # TODO identify and document all class variables
      @graphDiv = document.createElement("div")
      d3.select(@graphDiv).attr("class", "sayid-holder")
      @html $ @graphDiv

      # Transition links to their new position.
      link.transition()
          .duration(NODE_TRANSITION_DURATION)
          .attr("d", @diagonalProjection)

      # Transition exiting nodes to the parent's new position.
      link.exit().transition()
