Fix ordering bug, convert to use little-endian pack specifiers
Don't use die in lib, return undef