Improve uploading internals