Simplified the HandleAnvilItemName() code.