Refactor.
Use hash with indifferent access.