Simplify Twig code