Refactor of reporting infrastructure