Ported orthogonality checking. Added getRows and getCols methods for the matrix.