Interactive tree - code cleanup