Fix bugs and add tests for hashtable.
Closer.