Reorder struct members to avoid padding

Compilers add padding bytes automatically. Now, we re-order struct
members in such a way that we avoid automatic insertion of padding
bytes.