Refactored CKGCMAES.m