Seperated nameclient code from main function, can now be called independently. Altered makefile for testing.