[Commenting]

Added comments to the initial code. Should be easier to understand now.