Moved some of the server communication to the NodeJs server.