Updated MatrixSorter