very large refactoring
97 files changed