Changes to form handling and file upload