Mods to DistanceFromContainer sample