re-structuring and cleaning code for running HMM. code seems to work (error with buildfile identified. No NaNs in training. classification performance not yet known)