Refactoring code where roman numbers goes into a hash map