Fix hash key issues, and create unit tests for hash table using the buil...

...t in dictionary.