code cleaning, add files upload and file management (wip)