Added a matrix class