framework for refactoring into component-based structure