Added some comments to LocationsReplace to make it more readable.