Optimize OptimizeCommand