Updated tree building algorithm to use one found on http://blog.pixelingene.com/demos/d3_tree/