Massive Refactoring of the architecture