Switched from Slim implementation of Twig to custom implementation