Replace class variables with instance variables in client.rb