Code cleanup for reports