Refactoring reports functionality.