cleaned up some commented out code, and changed the tolerance for distance in the query