Add CSMath, minor changes