Cleanup dead-code optimizations.