huge refactoring wrt hclustering
huge changes wrt. hcluster