Added class toggling for the javascript for the modal