Added QR suppor and tests in the model