Refactor testing shuffling