County, courts hammer out new service contract