Refactored ServiceProvider