Some speed up added for incrementing ngrams -- could still be faster, but this only touches each row once at least.