Issue #3160020 by jungle, ravi.shankar, alexpott, ultrabob: Fix typos "iids, twoa, twob, roota, rootb, parentc" by refactoring