Model changes, fixed duplicating templates