wip: convert data writer to use explicit messages structs