Finished the first cut of MQTT message rewriting routines.