architecture refactoring