Starting to refactor the FamilyTree code into two different files.

Still has issues, but no time to test at the moment.