Large refactoring. Api changes. Internal name changes. The big mess.

The project compiles but any output is broken at that stage.