some cleanup in client.rb