Fixing child detection

Also TOC structure
Also move required and count to child listing