A bunch of stuff for getting the sockets up and running