Some cleanup -- improving counters and some logic.