Code optimization

Code optimization.