Add term reference tree module.

#5908