Moved twig function, filters and tests