Refactor: Extract Report Generation

Rough and ready refactor as the task file was starting to get a little bit meaty which may make future maintenance a little bit more costly - YMMV :)