replaced strtoll, (was tripping -Wall), fixed endianness confusion