Refactoring romanToInr conversion