total refactoring of hierarchical classification, old code removed