Implement JOIN over s2s protocol
Move some functions to make more sense in the listed order