completed CodeBook.md and comments in the code