Reorganise the templates.