Final versions of chapters 1, 2, 3, 4, 5, 6, 10, and 11