move MathOpt to Class Library