Various updates for typesetting.

Fairly small changes in chapters 5 and 6.