Removing the last major issues about code styling in CMA-ES.

Prefer to use $Math.max(i,j)$ rather than your own method.