Fixes for linux, builds with clang now.

Moved some headers around to make expanding the lib
using custom external decoders/devices easier.