Added form submission handling