reorganized templates and layouts