refactor for pendingOp cleanup