Fixed some tutorial typos and added missing code