Add the codebook, improve readme and small refactoring