Better organize tree implementations