Added tests for distances calculations and for point's potentials.