Separated out populating templates.