more speedups and a cunning plan to combine HMMs and MEMMs