function autoEdTemplates(str) { //MAIN FUNCTION describes list of fixes
//Remove unneeded Template: text from transclusions
str = str.replace(/{{*Template:*/gi, '{{');
//Replace redirects to Reflist with Reflist
str = str.replace(/{{*(?:Reference+List|References-Small|Reflink)*(\||}})/gi, '{{Reflist$1');
str = str.replace(/{{*(?:Refs|Reference|Ref-list|Listaref|FootnotesSmall)*(\||}})/gi, '{{Reflist$1');
//Replace a long version of Reflist with Reflist
str = str.replace(/<div*+class=*references-small**>*<references*\/>*<\/div>/gim, '{{Reflist}}');
//Replace redirects to about with about
str = str.replace(/{{*(?:Otheruses4|Four+other+uses|Otherusesabout|This2)*(\||}})/gi, '{{about$1');
return str;
}