Refactored handler into a service wrapper