CumSum refactoring for smaller nodes.