Added some comments to the code to explain what is where and why, along with my name.