Minor fixes in codebook