JS templates moved from script tags in html to external files