Refactoring XReal