Switch to TransportClient in Agent, various improvements.