Added helpful comments to the code