Split some classes from main.cpp into file.

Renamed private variables and macros to start with a "m_" instead of
just an underscore.
Started to change the binary converters so they are endian agnostic.