Added hmms for tree building.