Cleanup chapter 4 & 6 for reuse
Chapter 8 mostly done