Adding Twig permalink filter
Slight JS cleanup