Socket lib cleaned up