Extracted some methods of SimpleServer to a ConnectionHandler class easier to test.