Implement message writer.

(I don't really have a preference if you don't already have one)