Clean up event handling for form submission