type component refactoring