Refactored getHistory/Sequence.