Added form validation, issues fixed