Add classes to work with matrixes