Use waf instead of Makefile. Handle unix socket close (not sure about memory leak).