Add comment to the source

It has been added some comments to the source in order to clarify the undestanding of the code.