Refactoring around reporting
Hierarchical reporting version 0.1
Bug fix for hierarchical reporting