refactored iddqd
fixed bug in iddqd.utils.tmpl