Refactor to use the checkout branch