Code clean-up. Added more defect info to email body.