Extracted ModalController into new file. ModalController.js