Make loadProviders method shorter.