FIX: Codebook stuff