template cleanup for node