Refactor geo parsing