Bring Max's changes over to this fork of the book

Not sure I have the PR the correct direction. Will check after creating.