Code cleaning and optimization
MathMod - https://sourceforge.net/p/mathmod/tickets/2
Authored by: virtualmeet 2016-03-11
Parent: [r267]
Child: [r269]