Maybe extract_script_template would be more precise?