Family tree WIP and refactoring