Modularize WS server.