Added comments for codebook code.