integrated validations, reformatted the form, updated the queries