client.js still needs some clean up. Moved host and port to varialbles as it would be nice to keep the client standalone. Maybe move to command line options?