re-structuring templates, adding template tags