Made it so templates can be configured. Added checks for jquery and bootstrap modal to exist on the page.