Uses one web socket instead of two. Lots of code reuse and some wiring between the two ways of communicating. This serves as an intermediate step towards the new web socket implementation.