added some comments.

Just trying to make it easier to understand what is going on in here.