A little cleanup.
WIP - only missing type decls, packers, and unpackers.