Updated some code and refactored modals