Small optimizations in aggregrations