Refactoring around overall architecture