Major updates to exercise 3 plus minor updates for exercise 2.