Fixed hash table and added test code.