Optimization of the code.