Typedef all structs and remove packer function.
Set up struct typedefs correctly.