Completed exercises 2 of chapter 4
A lot more code and notes from chapter 4