Added array packing/unpacking to get kernel to work through ports