refactor qserver