56 message factory

This adds a basic message factory, so that other projects don't have to repeat similar code.