Initial changes to the membership functionality to support generic joining and leaving of memberships.