Use ancestry plugin

This gives us useful methods for dealing with parents and children and
allows us to write less code ourselves.