Added close functionality to modals