Refactor to use service factories for proxies.