use unix socket instead of tcp

and remove redundant unit test
moved unit tests to users