Added a new function to switch endianess.
switch little-endian to big-endian and vice versa.

switchEndianess(x)
some line breaks.