Minor cleanup and adding automatic QR version selection