I agree, the server need to be refactored, but this is not part of this pull request.