Improving getQR method
Code improvements