Added haversine and bearing functions