Minor fixes + added build capability for ngrams