Add functionality to tree generator script.