framework-project compiles now

finished the refactoring for now. The framework-project compiles again,
however there is still lots of refactoring to do and lots of ugly code
left.