Cleaned up the name_server code a little bit, seperated peer generation into 3 functions