Refactor ForOp and make ReduceOp.