Greatly simplified code to set tab widths.