Separated js into modal.js.