Improvements for form handling