speedups applied to scoretext.c, bigrams added