Fixed hashmap implementation and added testing.