Refactor and clean-up the identification of data for resequencing