Hash map was substituted by a ternary search tree.