Refactor modals to return promises