Some code cleanup in the vs template.