Minor cleanup of codebook