cleanups and code improvements
bugfixes of --clean
better upload progress