More code cleanup.
Working upload.