Experimented with new implementation of tree extraction that did not work.
Merging conflicts