Small fixes and api function to get providers.