Optimization of parameters.