Refactor API to use a client object to allow multiple connections.