[r] refactor service initialization, allow configuration to be injected more granulary