Lots of changes to socket system.