Use DOM allocation pool in loop-tpl; cleanup