Refactor server XQL.