Added templating of popups and popup opening via URL ID