Refactor reporting mechanism.