Remove dependency on MathGL