Moving chapter 2 code out of the way