Added simple functions to calculate nearest route.