Code Clean-up

and fixed little mistake that makes the server crash (sendReply() instead of this.sendReply()).