Parametrize register function with service class

We want to declare different types of services via a common interface.