Tiny cleanups in unpackb()
Reimplement packb() to use the type definitions