Added a closeMemberships method to the MembershipRepository.