MatrixArray fixed and tests working