Cleanup and improvements on FileUpload and getfile