Changed check on first submitted matrix to first check for equality before checking for column swaps since most users will likely not swap columns.