refactored the line counters ever so slightly.