Refactor membership expansion