Fix types
Add pack/unpack