Updated Chapters 6 and 7 taking into account feedback from @CanIbanoglu