Code cleanup; Moved ScanRename()