Change writer to have a "send" method which takes Messages. Also a test.