Simplify and refactor joining protocol.