Solved problem when changing major order in matrices. Added documentation for matrix.