Refactored handling of twig extension, deleted test code.