Finalising codebook