Improve datatrees module generation.