many fixes, new upload and download functions