Tweaked client.js