Add parent inheritance to message IDs.
Refactor and clean up message building processes.