updated docs and ncd.c
updated makefile, and used freeadrinfo() in ncd.c
updated documentation