Refactoring, to separate Big/Little-Endian stuff into classes instead of switches