make template resources flat