Managed the code a bit in upload.html