Setup serialization for Mesages. Needs testing
Made non-bitmask enums into enum classes

This makes them strongly typed,
helping us avoid type and conversion errors.