part 2 changes to socket organization and download/upload handling