Added ids for parents

Separated true parentage from the legacy node hierarchy.