Further reorganize and streamline join handling.