uploader: Refactor some codes to use Uploader.