added comments mostly so I could follow along as I read. Fixed a few spelling typos.