Refactor component