Moved scripts into separate twig function, to attach once in page header