Cleanup in code and added code to report