[TASK] Adapt to new interface method hasChildren
[TASK] Remove obsolete code