Added the matrix template class and the basic operations