Reafctor mustache templates to script tags