Added a configurable number of hierarchies