refactoring: architecture