Moved old chapter 4 code out of the way