Clean client code, add socket.io.