Refactor components