Deleting function and final upload