Fixed some tutorial typos and added missing code

I'm new to github so please accept my apologies if I've done this incorrectly. I've fixed some typos and reworked some parts so that they're easier to read on screen. There was a bit of code missing too.