Optimize program structure.