Work in progress: architecture refactoring