Adding tests for the rest of the matrix methods.Fix bugs in Matrix class.