improved form reset and tidy up