Renamings and minor fixes.
Inlining (and deprecating) copyAndInsertPair().