Optimize the scope operation.