Add code from 6.5 Exercises.