Refactored ParityQuery