Changes to use pointer to find endianess