Fixing endianess detection and memory leaks
Credits
Fix uninitialized struct members.

Found with cppcheck.
Merge pull request #23 from XhmikosR/master

Not really needed, but it is harmless and quits cppcheck complaining.
Thanks!