Added pruning of low-frequency n-grams; formatting improvements