Simplify realtime API code

tests pass with the mock server on my box.