Change template structure for grouping single source