Detecting trajectory id
Adding tree root to leaf transverse
Improved tree traverse
Fixes