cleaned up client.js