Restructured to facilitate different tree types