rm obsolete code; fix parent-child relation in node tree