Rewrote the rest of the union-based messages.
Cleaned up some code duplication, identified some problems.