Added aggregation level, with accompanying fixes.