Basic optimised ToHex function from Simon's idea
Tidy up the type, add prefix and document it
Switch stuff to use ToHex, resolving Simon's comment