Support group hierarchy in a tree structure

Still need to implement surplus-sharing across sibling groups