More changes to Scalar, Vector and Matrix classes