Moved the parenting code to the base entity