Add tests and initial joining code.