fixes to Codebook formatting