Moved Uploads code to the uploads template