Massive refactors to upload process. Mostly broken.