Renamed ID to Index and added a few comments. No further code has been added.