Various fixes plus code exchange totem.