Added block comments to explain the point of the code.