Improved QR code generation