Walk me through how you would refactor a legacy component to improve readability and testability at Recooty.