Moved QR code encoding to separate file