Optimized program ending.