Added type parameter to MathFunctions