Refactored ReduceTask