Checkout.com interview question

How would you tackle a refactor of a large codebase?