Add functions to allow raw bytes to be sent to popup routines.
More refactoring.