Create a new horizontal tree and rename the old to hierarchical. Change the algorithm for the vertical to do one DFS.