Refactor EchoServer