Adding uploading; refactors.