Tidy up revised renaming code