Planning For Autonomous Vehicles: Ridesharing And Traffic Control