Refactoring some minor issues in CMA-ES