Adding chapter 13 code.
Chapter 13: added toc and refs.