Commenting

I added comments so that the code makes sense.