Your data structure for a family tree isn't quite right. So starting from where you are is just gonna get more complicated.
The family tree itself is an object. I contains a network of linked persons. A person simply exists, but it's inserted into the family tree.
But you don't have a family tree object, you're trying to represent the free within Person, and now finding it's not such an easy thing to do. No one can do it, not just you.