Hashmap implementation using templates