Updated socket.io, put the methods for communicating with the router inside an object, and fixed some other basic issues.