Comments describing the code

Added some comments to describe what I want to achieve with this code.