Start of work on person_memberships_to_enrolments. Code cleanup.