Improve service provider.

As proposed in #43.