Changed the transposeMatrix method in MatrixUtils.java to a less convoluted version