Added comments to the code.

Added comments to the code.