Added reports form, refactored code