Added configuration option for number of hierarchies