Refactor modal with payforms