Resource logic moved to a service.