fix content templates and performance issue (unnecessary copy of vals)