Update code to use the latest client library