BK-tree implementation works.