major refactoring and restructuring on upload location