separates modal javascript and introduces CMS.settings