Revert "Use hashmap."

This reverts commit 5940200d9ea966d10fb79ccf4254077fd491161d.