Tidy chapter 4 solutions.