Added template updating.