Update how we get the provider id. Lots of this logic should be moved out of this project.