refactor hmmaligner; add testing for hmm aligner