Moving ProviderState collection into its own class
Fixing failing tests