Cleanup optimizer code.