Got rid off unnecessary calls of MathLibrary.