Added constructor and member variables to matrix.