begun refactoring of the architecture