More refactoring and TransferRepair work