Changed buffer to a thread. Changed name of ServerThread.
Fixed the plot.