Refactored JS.
Fix hiding the black background in the modals.