Adding Reporting capabilities and refactoring