cleaning and adding error modals.