Refactored the composite components from the carat project