Added support for re-parenting a node