Standardize algorithm variables and order of operations

Organized algorithms into own code file and renamed for-loop
variables to represent corresponding states.

Also ordered mathematical operation, so that error wouldn't accrue
differently in different functions.
Added naive Nth Viterbi Algorithm
Implemented Naive N-best algorithm and Simple_nth_viterbi

Simple_nth is slower and appears to use up too much memory.  Naive
is better than the simple.  Need to rewrite and optimize the
simple_nth_viterbi algorighthm