QR codes v0.9

Okay, QR codes are working nicely now.
Remind me not to write code when I haven't slept properly, it's not a pretty sight.