Cleaning up some stuff in sockets and others.