many small fixes
split up upload.R
new etc