Checkout.com Interview Question

How would you tackle a refactor of a large codebase?