Ch.5 code revisions based on reviewer/editor feedback