#10 Refactored hierarchial metric aggregation implementation.