Fix some issues in parent-child handling, did also some TODOs