Refactored all the JS that is in the navbar as well as the modals that are opened by the navbar.