Just some general cleanup in the HashMap module.

I went through the HashMap module, fixed spelling mistakes, minor inefficiencies, added tests, and other trivial changes. Hopefully this won't be a controversial PR.