Serialization is now only defined using typedefs

Easy to change to opposite byte order if ever required.