I am indebted to:

gdesmar for converting the tree builder from recusive to iterative so
we can build larger trees
