Refactoring component factory