Use sets instead of lists for command registration + handle parent and nested commands appropriately