Improve performance with the new stats.

Hmm, getting pretty ugly, ought to redo this...