Codebook and fixes