Make source code endianness agnostic

Closes #1