massive reorg of all the source files

The goal is to make the symbols exported cleaner and the ability to include/link/embed the whole thing easier.