Code cleanup in Repository, Sequence.