Refactor the history storage to make reading less reliant on map positionings