Refactor some conditional
Redefine report table