Rewrite component for better structure