Refactorise the asset twig extension