Add report processing functions, tests.