Code updates. Chapter 3 is done (ish)