Cleaned up trailing whitespaces

Was bored, decided to clean trailing whitespaces. Diff for additions and deletions is the same so I can only assume everything works as intended. The script I ran broke the images in chapter 6 so I fixed that in 26143a0