Some updates to the matrix class.