Reorganising of templates