Tree data manipulation for tnt project