#50 populate template after the popup has been opened; this seems to improve the loading time significantly