Modified communication between the server and the client to JSON messages and finished the broswer on the client side