Finish the code book, tweak code