portfolio refactoring