script: Make trees less generic