Refactores 'cmaes' fucntion parameters. Fixed tests.