Updating the code so that it can work with the remote server.