Improve datatrees generation script.