Refactor reporting handling as a precondition for sorting output.
Merge pull request #224 from troessner/refactor-reporting-handling-as-a-precondition-for-sorting-output

Refactor reporting handling as a precondition for sorting output.