Code cleaning and optimization
MathMod - https://sourceforge.net/p/mathmod/tickets/2
Authored by: virtualmeet 2015-11-30
Parent: [r215]
Child: [r217]