Fixes for 32-bit and big-endian architectures, after testing on my old PowerPC machine
Trivial changes
Merge: trivial stuff