Tested latest method (Viterbi3), and decided on an algorithm. Moved code into separate classes.