Reworked the tree structure to be more homogeneous