This function should traverse the elements of the tree depth-first. An optional callback parameter should be available to that this function can be used for the following:
renaming the tree
computing width of the grid
Other issues to consider:
should a copy of the passed tree be created so that its state isn't being updated while being parsed?
the column count and coordinates of each node needs to be updated during traversal; functional way to do this?
This function should traverse the elements of the tree depth-first. An optional callback parameter should be available to that this function can be used for the following:
Other issues to consider: