Finished up JS and integrated with client.js