Refactor Connection class to use ActorProxy.