Added test case for hash table and improved the codes