Refactored the Cypress logic into a separate module.