Made the endianness swap functions static and public, for general use