Refactored service.