Refactor modals