Updated some Javadoc. Formatted code.
Put some basic form validation in.
Improved the form validation and error messages.