Matrix: Removed maybe monad, deprecated matrix and type because of matrix.type