Join room protocol and refactored client code duplication.