Reorganize methods into a RoadGraph class.