refactored service providers and repositories