Improve promises use and improve modals