SQL updated

Mostly formatting fixes, but SQL added to second page and email system
updated. Next to be done is variable binding to allow actual update of
table based on number of applicants.