Refactoring twig templates