Added unit tests for hash list, and fixed memory leaks