Comments added

Detailed description of the code