Refactored ConstructComponent() method.