Refactoring upload and web module