Added form validation and modal