minor cleanups of template test iterable code