Support big-endian, other checks and cleanups.