Added the start of the tree optimizer prototype.