Refactor stprov into packages that can be tested in isolation
Too much of stprov's logic is essentially running on a "main" path that is difficult to test. When we have a bit more time available for refactoring, it would be good to get as much as possible into reusable packages that we can test in isolation.
This is an overall placeholder issue; it might make sense to replace it with several concrete issues once there is a plan to work on this.