Better joining logic. Now need to figure out how to ungroup rebelious groups.