Refactoring XQL.