Change code to HashMap with a static initializer