Upload management + code cleaning