Rename internal idx to sequence_number