Cleanups in sock_comm