Move middleware stack to services to allow different stacks per service.