Preparation for the unit tests
Refactored service factory