Implement and assert on message prefix functions.

Closes #9.