Chapter 10

Fixes #58 and fixes #77.