large refactoring of new code
40 files changed