Added form validation.  Refactored forms to reduce redundancy.