Various changes to uploading functionality