First cut of HMM implementation. Performance is intractable.