Fixed the server-client communucation functions, added the self parameter