Cleaned up the comments on distance function