add async upload,  various refacotrings and PRP8 fixes