cleanup & more work on upload sequence