Major refactoring and restructuring.

Does not currently work. Viterbi algorithm needs work for accepting HmmModel's
parameters.