Refactored constructor to use more idiomatic composite literal syntax
Refactored code so that design can easily be generalized to keys of type other than string