Replace 'each' block in stats-generation with neater and more legible 'reduce' addition call.