Added comments to all code