Moved all of the socket.io stuff on the server side to one section