Optimize code structure.