mods, mainly improving SocketManager