Code cleanup and start of report 1