Extract separately reusable Tree module. Renamings.
Add a Monoid instance for Tree.