Reworked gen and upload portions.