Changed skeleton of networking. Writer thread now going on separate thread.