[Clean] clean code in client.js