Shuffled around stuff from chapters 2 and 3 to get related work in