Sharpened logic for handling attachments and toggling between QR codes ....