Added templated classes for matrix matrix math.