Fixed bug, updated codebook and readme