Added data driven functionality to trees