Refactored to HashMap.