Changed closest_node calc to use AR DB