Implement dohashset
Implement dohashset

Refactor other functions to use it.
All tests pass.