Updated template JS file