Refactor how clients are represented and socket data sent.