Hierarchical classification refactoring. Temporary added linked version of tree.