template scripts: cleanup