restructured connections to external services