Added: Unique index to membership, accepted status to invites, prevented duplicate invites, improved invite logic and loops