Big refactor, ProviderAPI looks better.