Added initial big endian support and slight tidy.
Fixed several integer bugs.