refactoring of component registration