Yes category controller code moved to twig code...
I'm not very confortable with this part and you'll see it's really similar to children.json.twig.