Uploading algorithm improvements