I've started the process of generating the root-based hierarchy of entries, a phenomenally complicated process, but with SMK's excellent documentation I'm making good progress. I'm still completely at a loss as to how I'll sort entries within the subgroups, but we'll come to that when we've managed to generate all the subgroups accurately.