Made some changes to client and server