Refactor communication slightly in preparation for WebSocket implementation.
Reorder driver code to isolate client-server communication.
Refactor driver to parametrize over client-server communication.
Implement WebSocket communication. #23