Code for excercises for chapters 13 and 14.